In [1]:
# Requires PyPlot

using ApproxFun

Laplace Equation $u_{xx} + u_{yy} = 0$


In [2]:
d=Disk()
u=[dirichlet(d),lap(d)]\Fun(z->real(exp(z)),Circle())

ApproxFun.plot(pad(u,50,50)) # we pad to get a nice plot;


INFO: Loading help data...

Check the error:


In [3]:
u[.1,.2]-real(exp(.1+.2im))


Out[3]:
0.0 + 1.3877787807814457e-17im

Poisson equation $u_{xx} + u_{yy} = f(x,y)$


In [9]:
d=Disk()
f=Fun((x,y)->exp(-10(x+.2)^2-20(y-.1)^2),d) 
u=[dirichlet(d),lap(d)]\[0.,f]
ApproxFun.plot(u);


Helmholtz $u_{xx} + u_{yy} + 100u=0$


In [5]:
d=Disk()

u=[dirichlet(d),lap(d)+100I]\1.0
ApproxFun.plot(u);



In [6]:
d=Disk()

u=[neumann(d),lap(d)+100I]\1.0
ApproxFun.plot(u);


Screened Poisson $u_{xx} + u_{yy} - 100u = 0, \partial u(\partial d) = 1$


In [7]:
d=Disk()
u=[neumann(d),lap(d)-100.0I]\1.0
ApproxFun.plot(u);


Laplacian squared $\Delta^2 u = 0$


In [8]:
d=Disk()

u=[dirichlet(d),neumann(d),lap(d)^2]\Fun(z->real(exp(z)),Circle())
ApproxFun.plot(pad(u,50,50)) # we pad to get a nice plot;